package com.rongke.model;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rongke.utils.DateJsonDeserializer;
import com.rongke.utils.DateJsonSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.List;

/**
 * @PropName
 * @属性名(prop_name)
 * @version : Ver 1.0
 */
//json序列化时忽略bean中的一些属性序列化和反序列化时抛出的异常
@JsonIgnoreProperties(value = {"handler"})
@TableName("prop_name")
public class PropName implements Serializable {
	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	/**
	 * @备注:属性名id
	 * @字段:id BIGINT(19)
	 */
	@TableId(type = IdType.AUTO)
	private Long id;


	/**
	 * @备注:属性名
	 * @字段:attr_name VARCHAR(30)
	 */
	private String attrName;


	/**
	 * @备注:别名
	 * @字段:alias VARCHAR(30)
	 */
	private String alias;


	/**
	 * @备注:分类id
	 * @字段:classify_id BIGINT(19)
	 */
	private Long classifyId;
	@TableField(exist = false)
	private List<PropValue> propValues;

	/**
	 * @备注:创建时间
	 * @字段:gmt_datetime DATETIME(19)
	 */
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date gmtDatetime;


	/**
	 * @备注:修改时间
	 * @字段:upt_datetime DATETIME(19)
	 */
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date uptDatetime ;


	public PropName(){
	}

	public PropName(
		Long id
	){
		this.id = id;
	}

	public List<PropValue> getPropValues() {
		return propValues;
	}

	public void setPropValues(List<PropValue> propValues) {
		this.propValues = propValues;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}


	public void setAttrName(String attrName) {
		this.attrName = attrName;
	}

	public String getAttrName() {
		return this.attrName;
	}


	public void setAlias(String alias) {
		this.alias = alias;
	}

	public String getAlias() {
		return this.alias;
	}


	public void setClassifyId(Long classifyId) {
		this.classifyId = classifyId;
	}

	public Long getClassifyId() {
		return this.classifyId;
	}


	public void setGmtDatetime(java.util.Date gmtDatetime) {
		this.gmtDatetime = gmtDatetime;
	}

	public java.util.Date getGmtDatetime() {
		return this.gmtDatetime;
	}


	public void setUptDatetime(java.util.Date uptDatetime) {
		this.uptDatetime = uptDatetime;
	}

	public java.util.Date getUptDatetime() {
		return this.uptDatetime;
	}
}
